<!DOCTYPE html>
<html lang="en" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/css/custom.form.css">
</head>
<body>

<div class="panel panel-default operation" hidden>
    <div class="panel-heading title"></div>
    <div class="layui-card-body">
        <form id="fromzjl" class="layui-form " action="" lay-filter="tSeatsInfozjl"
              style="width: 700px;margin-top: 10px">
            <input type="id" name="id" hidden/>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <select id="roleIdzjl" name="role" lay-filter="select-type" lay-verify="required">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="text" name="account" placeholder="请输入账号" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');"
                               class="layui-input " id ="classaccountzjl" lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-label ">密码</div>
                    <div class="layui-input-block">
                        <input type="text" name="password" placeholder="请输入密码" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-block">
                        <input type="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input"
                               lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="phonezjl" name="phone" placeholder="请输入联系方式" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">部门</label>
                    <div class="layui-input-block">
                        <select id="deptId" name="dept" lay-filter="select-type" lay-verify="required">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="submitzjladd">保存</button>
                    <button class="layui-btn layui-btn-primary cancel">返回</button>
                </div>
            </div>
        </form>

        <form id="fromgly" class="layui-form " action="" lay-filter="tSeatsInfogly" style="width: 700px;margin-top: 10px">
            <input type="id" name="id" hidden/>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <select id="roleId" name="role" lay-filter="select-type" lay-verify="required">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="accountid" name="account" placeholder="请输入账号" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');"
                               class="layui-input " id ="classaccountgly" lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-label ">密码</div>
                    <div class="layui-input-block">
                        <input type="text" name="password" placeholder="请输入密码" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">公司名称</label>
                    <div class="layui-input-block">
                        <input type="corporatename" name="corporatename" placeholder="请输入公司名称" autocomplete="off"
                               class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系人</label>
                    <div class="layui-input-block">
                        <input type="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input"
                               lay-verify="required">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="phone" name="phone" placeholder="请输入联系方式" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row tcType1">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select id="tcType1" name="tcType1">
                            <option value="1">坐席账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">剩余分钟数</label>
                    <div class="layui-input-block">
                        <input type="residue1" name="residue1" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row tcType2">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select id="tcType2" name="tcType2">
                            <option value="2">套餐账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">月套餐数</label>
                    <div class="layui-input-block">
                        <input type="residue2" name="residue2" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">金额（元）</label>
                    <div class="layui-input-block">
                        <input type="amount" name="amount" placeholder="每分钟金额" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">到期时间</label>
                    <div class="layui-input-block">
                        <select id="endTime" name="endTime">
                            <option value="1">1个月</option>
                            <option value="2">2个月</option>
                            <option value="3">3个月</option>
                            <option value="4">4个月</option>
                            <option value="5">5个月</option>
                            <option value="6">6个月</option>
                            <option value="7">7个月</option>
                            <option value="8">8个月</option>
                            <option value="9">9个月</option>
                            <option value="10">10个月</option>
                            <option value="11">11个月</option>
                            <option value="12">12个月</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">线路</label>

                    <div class="layui-input-block">
                        <select id="line" name="line">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">apkid</label>
                    <div class="layui-input-block">
                        <input type="apkid" name="apkid" placeholder="请输入apkid" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">ak</label>
                    <div class="layui-input-block">
                        <input type="ak" name="ak" placeholder="请输入ak" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">sk</label>
                    <div class="layui-input-block">
                        <input type="sk" name="sk" placeholder="请输入sk" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">坐席数量</label>
                    <div class="layui-input-block">
                        <input type="seats" name="seats" placeholder="请输入坐席数量" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">模式</label>
                    <div class="layui-input-block">
                        <input type="radio" name="mode" value="主叫" title="主叫" >
                        <input type="radio" name="mode" value="被叫" title="被叫" checked>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">销售姓名</label>
                <div class="layui-input-block">
                    <input type="salesname" name="salesname" placeholder="请输入销售姓名" autocomplete="off"
                           class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="submitglyadd">保存</button>
                    <button class="layui-btn layui-btn-primary canceladd">返回</button>
                </div>
            </div>
        </form>
        <form id="fromdls" class="layui-form " action="" lay-filter="tSeatsInfodls" style="width: 700px;margin-top: 10px">
            <input type="id" name="id" hidden/>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <select id="roleIddls" name="role" lay-filter="select-type" lay-verify="required">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="accountid" name="account" placeholder="请输入账号" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');"
                               class="layui-input " id ="classaccountdls" lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-label ">密码</div>
                    <div class="layui-input-block">
                        <input type="text" name="password" placeholder="请输入密码" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">公司名称</label>
                    <div class="layui-input-block">
                        <input type="corporatename" name="corporatename" placeholder="请输入公司名称" autocomplete="off"
                               class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系人</label>
                    <div class="layui-input-block">
                        <input type="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input"
                               lay-verify="required">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="phone" name="phone" placeholder="请输入联系方式" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row tcType1">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select id="tcType1dls" name="tcType1">
                            <option value="1">坐席账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">剩余分钟数</label>
                    <div class="layui-input-block">
                        <input type="residue1" name="residue" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row tcType2">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select id="tcType2dls" name="tcType2">
                            <option value="2">套餐账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">月套餐数</label>
                    <div class="layui-input-block">
                        <input type="residue2" name="residue" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">金额（元）</label>
                    <div class="layui-input-block">
                        <input type="amount" name="amount" placeholder="每分钟金额" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">到期时间</label>
                    <div class="layui-input-block">
                        <select id="endTimedls" name="endTime">
                            <option value="1">1个月</option>
                            <option value="2">2个月</option>
                            <option value="3">3个月</option>
                            <option value="4">4个月</option>
                            <option value="5">5个月</option>
                            <option value="6">6个月</option>
                            <option value="7">7个月</option>
                            <option value="8">8个月</option>
                            <option value="9">9个月</option>
                            <option value="10">10个月</option>
                            <option value="11">11个月</option>
                            <option value="12">12个月</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">线路</label>

                    <div class="layui-input-block">
                        <select id="linedls" name="line">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">apkid</label>
                    <div class="layui-input-block">
                        <input type="apkid" name="apkid" placeholder="请输入apkid" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">ak</label>
                    <div class="layui-input-block">
                        <input type="ak" name="ak" placeholder="请输入ak" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">sk</label>
                    <div class="layui-input-block">
                        <input type="sk" name="sk" placeholder="请输入sk" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">坐席数量</label>
                    <div class="layui-input-block">
                        <input type="seats" name="seats" placeholder="请输入坐席数量" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="submitdlsadd">保存</button>
                    <button class="layui-btn layui-btn-primary canceladd" >返回</button>
                </div>
            </div>
        </form>

    </div>
</div>
<div class="panel panel-default operationeidt" hidden>
    <div class="panel-heading title"></div>
    <div class="layui-card-body">
        <form id="fromzjleidt" class="layui-form " action="" lay-filter="tSeatsInfozjleidt"
              style="width: 700px;margin-top: 10px">
            <input type="id" name="id" hidden/>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <select id="roleIdzjleidt" name="role" lay-filter="select-type" lay-verify="required">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="text" name="account" placeholder="请输入账号" autocomplete="off"
                               class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-label ">密码</div>
                    <div class="layui-input-block">
                        <input type="text" name="password" placeholder="请输入密码" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-block">
                        <input type="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input"
                               lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="phonezjl" name="phone" placeholder="请输入联系方式" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">部门</label>
                    <div class="layui-input-block">
                        <select id="deptIdeidt" name="dept" lay-filter="select-type" lay-verify="required">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="submitzjl">保存</button>
                    <button class="layui-btn layui-btn-primary canceleidt" id="btn_cancelzjleidt">返回</button>
                </div>
            </div>
        </form>

        <form id="fromglyeidt" class="layui-form " action="" lay-filter="tSeatsInfoglyeidt" style="width: 700px;margin-top: 10px">
            <input type="id" name="id" hidden/>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <select id="roleIdeidt" name="role" lay-filter="select-type" lay-verify="required">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="accountid" name="account" placeholder="请输入账号" autocomplete="off"
                               class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-label ">密码</div>
                    <div class="layui-input-block">
                        <input type="text" name="password" placeholder="请输入密码" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">公司名称</label>
                    <div class="layui-input-block">
                        <input type="corporatename" name="corporatename" placeholder="请输入公司名称" autocomplete="off"
                               class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系人</label>
                    <div class="layui-input-block">
                        <input type="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input"
                               lay-verify="required">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="phone" name="phone" placeholder="请输入联系方式" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row tcType1">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select  name="tcType">
                            <option value="1">坐席账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">剩余分钟数</label>
                    <div class="layui-input-block">
                        <input type="text" name="residue1" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row tcType2">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select  name="tcType">
                            <option value="2">套餐账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">月套餐数</label>
                    <div class="layui-input-block">
                        <input type="text" name="residue2" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">金额（元）</label>
                    <div class="layui-input-block">
                        <input type="text" name="amount" placeholder="每分钟金额" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">到期时间</label>
                    <div class="layui-input-block">
                        <select name="endTime">
                            <option value="1">1个月</option>
                            <option value="2">2个月</option>
                            <option value="3">3个月</option>
                            <option value="4">4个月</option>
                            <option value="5">5个月</option>
                            <option value="6">6个月</option>
                            <option value="7">7个月</option>
                            <option value="8">8个月</option>
                            <option value="9">9个月</option>
                            <option value="10">10个月</option>
                            <option value="11">11个月</option>
                            <option value="12">12个月</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">线路</label>

                    <div class="layui-input-block">
                        <select id="lineeidt" name="line">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">apkid</label>
                    <div class="layui-input-block">
                        <input type="text" name="apkid" placeholder="请输入apkid" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">ak</label>
                    <div class="layui-input-block">
                        <input type="text" name="ak" placeholder="请输入ak" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">sk</label>
                    <div class="layui-input-block">
                        <input type="text" name="sk" placeholder="请输入sk" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">坐席数量</label>
                    <div class="layui-input-block">
                        <input type="text" name="seats" placeholder="请输入坐席数量" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">模式</label>
                    <div class="layui-input-block">
                        <input type="radio" name="mode" value="主叫" title="主叫" >
                        <input type="radio" name="mode" value="被叫" title="被叫" checked="">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">销售姓名</label>
                <div class="layui-input-block">
                    <input type="text" name="salesname" placeholder="请输入销售姓名" autocomplete="off"
                           class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="submitglyeidt">保存</button>

                    <button class="layui-btn layui-btn-primary canceleidt">返回</button>
                </div>
            </div>
        </form>
        <form id="fromdlseidt" class="layui-form " action="" lay-filter="tSeatsInfodls" style="width: 700px;margin-top: 10px">
            <input type="id" name="id" hidden/>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <select id="roleIddlseidt" name="role" lay-filter="select-type" lay-verify="required">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="accountid" name="account" placeholder="请输入账号" autocomplete="off"
                               class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-label ">密码</div>
                    <div class="layui-input-block">
                        <input type="text" name="password" placeholder="请输入密码" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">公司名称</label>
                    <div class="layui-input-block">
                        <input type="corporatename" name="corporatename" placeholder="请输入公司名称" autocomplete="off"
                               class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系人</label>
                    <div class="layui-input-block">
                        <input type="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input"
                               lay-verify="required">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="phone" name="phone" placeholder="请输入联系方式" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row tcType1">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select name="tcType1">
                            <option value="1">坐席账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">剩余分钟数</label>
                    <div class="layui-input-block">
                        <input type="residue1" name="residue" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row tcType2">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select name="tcType2">
                            <option value="2">套餐账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">月套餐数</label>
                    <div class="layui-input-block">
                        <input type="residue2" name="residue" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">金额（元）</label>
                    <div class="layui-input-block">
                        <input type="amount" name="amount" placeholder="每分钟金额" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">到期时间</label>
                    <div class="layui-input-block">
                        <select  name="endTime">
                            <option value="1">1个月</option>
                            <option value="2">2个月</option>
                            <option value="3">3个月</option>
                            <option value="4">4个月</option>
                            <option value="5">5个月</option>
                            <option value="6">6个月</option>
                            <option value="7">7个月</option>
                            <option value="8">8个月</option>
                            <option value="9">9个月</option>
                            <option value="10">10个月</option>
                            <option value="11">11个月</option>
                            <option value="12">12个月</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">线路</label>

                    <div class="layui-input-block">
                        <select id="linedlseidt" name="line">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">apkid</label>
                    <div class="layui-input-block">
                        <input type="apkid" name="apkid" placeholder="请输入apkid" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">ak</label>
                    <div class="layui-input-block">
                        <input type="ak" name="ak" placeholder="请输入ak" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">sk</label>
                    <div class="layui-input-block">
                        <input type="sk" name="sk" placeholder="请输入sk" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">坐席数量</label>
                    <div class="layui-input-block">
                        <input type="seats" name="seats" placeholder="请输入坐席数量" autocomplete="off" class="layui-input">
                    </div>
                </div>

            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="submitgly">保存</button>
                    <button class="layui-btn layui-btn-primary canceleidt" id="btn_canceldlseidt">返回</button>
                </div>
            </div>
        </form>

    </div>
</div>
<div class="panel panel-default operationin" hidden>
    <div class="panel-heading title"></div>
    <div class="layui-card-body">
        <form id="fromzjlin" class="layui-form " action="" lay-filter="tSeatsInfozjlin"
              style="width: 700px;margin-top: 10px">
            <input type="id" name="id" hidden/>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <input type="text" name="role"  class="layui-input"  lay-verify="required" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="text" name="account"  class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-label ">密码</div>
                    <div class="layui-input-block">
                        <input type="text" name="password" class="layui-input" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-block">
                        <input type="contacts" name="contacts" class="layui-input"
                               lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="phonezjl" name="phone"  class="layui-input" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">部门</label>
                    <div class="layui-input-block">
                        <input type="phonezjl" name="dept"  class="layui-input" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-primary" id="btn_cancelzjlin">返回</button>
                </div>
            </div>
        </form>

        <form id="fromglyin" class="layui-form " action="" lay-filter="tSeatsInfoglyin" style="width: 700px;margin-top: 10px">
            <input type="id" name="id" hidden/>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <input type="text" name="role" class="layui-input "  lay-verify="required" readonly>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="text" name="account" class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-label ">密码</div>
                    <div class="layui-input-block">
                        <input type="text" name="password" class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">公司名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="corporatename" class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系人</label>
                    <div class="layui-input-block">
                        <input type="text" name="contacts" class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="text" name="phone" class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
            </div>

            <div class="layui-row tcType1">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <input type="text" name="tcType" class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">剩余分钟数</label>
                    <div class="layui-input-block">
                        <input type="text" name="residue"  class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-row tcType2">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <input type="text" name="tcType" class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">月套餐数</label>
                    <div class="layui-input-block">
                        <input type="text" name="residue"  class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">金额（元）</label>
                    <div class="layui-input-block">
                        <input type="text" name="amount"  class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">到期时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="endtime"  class="layui-input" lay-verify="required" readonly>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">线路</label>
                    <div class="layui-input-block">
                        <input type="text" name="line"  class="layui-input "  lay-verify="required" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">apkid</label>
                    <div class="layui-input-block">
                        <input type="apkid" name="apkid" class="layui-input" readonly>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">ak</label>
                    <div class="layui-input-block">
                        <input type="apkid" name="ak" class="layui-input" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">sk</label>
                    <div class="layui-input-block">
                        <input type="apkid" name="sk" class="layui-input" readonly>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">坐席数量</label>
                    <div class="layui-input-block">
                        <input type="seats" name="seats"  autocomplete="off" class="layui-input" readonly>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">模式</label>
                    <div class="layui-input-block">
                        <input type="radio" name="mode" value="主叫" title="主叫" readonly>
                        <input type="radio" name="mode" value="被叫" title="被叫" checked="" readonly>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">销售姓名</label>
                <div class="layui-input-block">
                    <input type="seats" name="salesname"  autocomplete="off" class="layui-input" readonly>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-primary" id="btn_cancelglyin">返回</button>
                </div>
            </div>
        </form>
        <form id="fromdlsin" class="layui-form " action="" lay-filter="tSeatsInfodlsin" style="width: 700px;margin-top: 10px">
            <input type="id" name="id" hidden/>
            <div class="layui-row ">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <select id="roleIddls" name="role" lay-filter="select-type" lay-verify="required">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input type="accountid" name="account" placeholder="请输入账号" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');"
                               class="layui-input " id ="" lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-label ">密码</div>
                    <div class="layui-input-block">
                        <input type="text" name="password" placeholder="请输入密码" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">公司名称</label>
                    <div class="layui-input-block">
                        <input type="corporatename" name="corporatename" placeholder="请输入公司名称" autocomplete="off"
                               class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系人</label>
                    <div class="layui-input-block">
                        <input type="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input"
                               lay-verify="required">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="phone" name="phone" placeholder="请输入联系方式" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row tcType1">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select id="tcType1dls" name="tcType1">
                            <option value="1">坐席账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">剩余分钟数</label>
                    <div class="layui-input-block">
                        <input type="residue1" name="residue" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row tcType2">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">套餐类型</label>
                    <div class="layui-input-block">
                        <select id="tcType2dls" name="tcType2">
                            <option value="2">套餐账户</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">月套餐数</label>
                    <div class="layui-input-block">
                        <input type="residue2" name="residue" placeholder="请输入剩余分钟数" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">金额（元）</label>
                    <div class="layui-input-block">
                        <input type="amount" name="amount" placeholder="每分钟金额" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">到期时间</label>
                    <div class="layui-input-block">
                        <select id="endTimedls" name="endTime">
                            <option value="1">1个月</option>
                            <option value="2">2个月</option>
                            <option value="3">3个月</option>
                            <option value="4">4个月</option>
                            <option value="5">5个月</option>
                            <option value="6">6个月</option>
                            <option value="7">7个月</option>
                            <option value="8">8个月</option>
                            <option value="9">9个月</option>
                            <option value="10">10个月</option>
                            <option value="11">11个月</option>
                            <option value="12">12个月</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">线路</label>

                    <div class="layui-input-block">
                        <select id="linedls" name="line">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">apkid</label>
                    <div class="layui-input-block">
                        <input type="apkid" name="apkid" placeholder="请输入apkid" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">ak</label>
                    <div class="layui-input-block">
                        <input type="ak" name="ak" placeholder="请输入ak" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">sk</label>
                    <div class="layui-input-block">
                        <input type="sk" name="sk" placeholder="请输入sk" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class=" layui-col-md6">
                    <label class="layui-form-label">坐席数量</label>
                    <div class="layui-input-block">
                        <input type="seats" name="seats" placeholder="请输入坐席数量" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!--                <div class="layui-col-md6">-->
                <!--                    <label class="layui-form-label">模式</label>-->
                <!--                    <div class="layui-input-block">-->
                <!--                        <input type="radio" name="mode" value="主叫" title="主叫" >-->
                <!--                        <input type="radio" name="mode" value="被叫" title="被叫" checked="">-->
                <!--                    </div>-->
                <!--                </div>-->
            </div>

            <!--            <div class="layui-form-item">-->
            <!--                <label class="layui-form-label">销售姓名</label>-->
            <!--                <div class="layui-input-block">-->
            <!--                    <input type="salesname" name="salesname" placeholder="请输入销售姓名" autocomplete="off"-->
            <!--                           class="layui-input">-->
            <!--                </div>-->
            <!--            </div>-->

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="submitgly">保存</button>
                    <button class="layui-btn layui-btn-primary" id="btn_canceldls">返回</button>
                </div>
            </div>
        </form>

    </div>
</div>

<div class="table_div" hidden>
    <div id="searchParam" shiro:hasPermission="tSeats:list">
        <div class="layui-form-item">
            <div class="layui-input-inline" id="usernameScid" hidden>
                <input id="usernameSc" type="accountid" name="accountid" placeholder="请输入用户名" autocomplete="off"
                       class="layui-input">
            </div>

            <div class="layui-input-inline" id="accountidScid" hidden>
                <input id="accountidSc" type="accountid" name="accountid" placeholder="请输入账号或手机号" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');"
                       class="layui-input">
            </div>
            <div class="layui-input-inline layui-form" id="roleIdSCid" hidden>
                <select id="roleIdSC" name=>
                    <option value="">请选择角色</option>
                </select>
            </div>
            <div class="layui-input-inline layui-form" id="smfsid" hidden>
                <select id="smfs">
                    <option value="">请选择售卖方式</option>
                </select>
            </div>
            <div class="layui-input-inline layui-form" id="zxSCid">
                <select id="zxlxSC">
                    <option value="">请选择坐席类型</option>
                    <option value="0">0</option>
                    <option value="1">1</option>
                </select>
            </div>
            <div class="layui-input-inline layui-form" id="stateSCid">
                <select id="stateSC">
                    <option value="">请选择坐席状态</option>
                    <option value="0">启用</option>
                    <option value="1">禁用</option>
                </select>
            </div>
            <div class="layui-input-inline layui-form" id="tclxSCid" hidden>
                <select id="tclxSC">
                    <option value="">请选择套餐类型</option>
                    <option value="1">坐席账户</option>
                    <option value="2">套餐账户</option>
                </select>
            </div>
            <div class="layui-input-inline layui-form" id="lineSCid" hidden>
                <select id="lineSC">
                    <option value="">请选择线路</option>
                </select>
            </div>
            <div class="layui-input-inline layui-form" id="corporatenameSCid" hidden>
                <select id="corporatenameSC">
                    <option value="">请选择公司名称</option>
                </select>
            </div>
            <div class="layui-input-inline layui-form" id="salesnameSCid" hidden>
                <select id="salesnameSC">
                    <option value="">请选择签单销售</option>
                </select>
            </div>

            <div class="layui-input-inline ">
                <button class="layui-btn" onclick="search()" id="search">查询</button>
                <button class="layui-btn" id="export">导出全部</button>
            </div>
        </div>

    </div>
    <table class="layui-table" id="showTable" lay-filter="showTable"></table>
</div>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">

        <button class="layui-btn layui-btn-sm " id = "addgly" lay-event="addType1" shiro:hasPermission="tSeats:add">添加坐席</button>
        <button class="layui-btn layui-btn-sm " id = "addglytc" lay-event="addType2" shiro:hasPermission="tSeats:add">添加坐席(套餐模式)</button>
        <button class="layui-btn layui-btn-sm" lay-event="batchDeleted" shiro:hasPermission="tSeats:delete">删除</button>
    </div>
</script>
<script type="text/html" id="toolbardls">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm "  lay-event="addType1" shiro:hasPermission="tSeats:add">添加坐席</button>
        <button class="layui-btn layui-btn-sm "  lay-event="addType2" shiro:hasPermission="tSeats:add">添加坐席(套餐模式)</button>
        <button class="layui-btn layui-btn-sm" lay-event="batchDeleted" shiro:hasPermission="tSeats:delete">删除</button>
    </div>
</script>
<script type="text/html" id="toolbarzjl">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm"  lay-event="addTypezjl" shiro:hasPermission="tSeats:add">添加坐席(总经理角色)
        </button>

<!--        <button class="layui-btn layui-btn-sm" lay-event="batchDeleted" shiro:hasPermission="tSeats:delete">删除</button>-->
    </div>
</script>

<script type="text/html" id="tool">
    <a class="layui-btn layui-btn-xs" lay-event="edit" shiro:hasPermission="tSeats:update">编辑</a>
    <a class="layui-btn layui-btn-xs" lay-event="editfzs" shiro:hasPermission="tSeats:update">分钟数</a>
    <a class="layui-btn layui-btn-xs" lay-event="editxf" shiro:hasPermission="tSeats:update">续费</a>
    <a class="layui-btn layui-btn-xs" lay-event="editxh" shiro:hasPermission="tSeats:update">小号</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" shiro:hasPermission="tSeats:delete">删除</a>
</script>
<script type="text/html" id="tooldls">
    <a class="layui-btn layui-btn-xs" lay-event="editdls" shiro:hasPermission="tSeats:update">编辑</a>
    <a class="layui-btn layui-btn-xs" lay-event="editfzs" shiro:hasPermission="tSeats:update">分钟数</a>
    <a class="layui-btn layui-btn-xs" lay-event="editxf" shiro:hasPermission="tSeats:update">续费</a>
    <a class="layui-btn layui-btn-xs" lay-event="editxh" shiro:hasPermission="tSeats:update">小号</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" shiro:hasPermission="tSeats:delete">删除</a>
</script>

<script type="text/html" id="tooldlszjl">
    <a class="layui-btn layui-btn-xs" lay-event="editzjl" shiro:hasPermission="tSeats:update">编辑</a>
</script>

<div id="editfzs" class="demo-transfer" style="display: none">
    <form class="layui-form " action="" lay-filter="editfzsInfo" style="width: 700px;margin-top: 10px">
        <input type="id" name="id" hidden/>
        <div class="layui-form-item">
            <label class="layui-form-label">操作类型</label>
            <div class="layui-input-block">
                <select id="cztype" name="cztype" lay-filter="select-type" lay-verify="required">
                    <option value="1">增加</option>
                    <option value="2">减少</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">分钟数</label>
            <div class="layui-input-block">
                <input type="fzs" name="fzs" id="fzs" placeholder="请输入分钟数" autocomplete="off" class="layui-input"
                       lay-verify="required">
            </div>
            <div class="layui-form-item" hidden>
                <label class="layui-form-label">手机号码</label>
                <div class="layui-input-inline">
                    <input type="text" name="mobile" id="mobile" lay-verify="mobile">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">验证码</label>
                <div class="layui-input-inline">
                    <input type="text" name="smscode" id="smscode" lay-verify="smscode" autocomplete="off" class="layui-input" disabled="disabled">
                </div>
                <div class="layui-input-inline">
                    <input type="button" class="layui-btn layui-btn-primary" id="btnSendCode" disabled="disabled"value="获取验证码">
                </div>
            </div>
        </div>
    </form>
</div>

<div id="editxf" class="demo-transfer" style="display: none">
    <form class="layui-form " action="" lay-filter="editxfInfo" style="width: 700px;margin-top: 10px">
        <input type="id" name="id" hidden/>
        <div class="layui-form-item">
            <label class="layui-form-label">已购套餐</label>
            <div class="layui-input-block">
                <select id="ygtc" name="ygtc" lay-filter="select-type" lay-verify="required">
                    <option value="0">套餐0</option>
                    <option value="1">套餐1</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">续费月份</label>
            <div class="layui-input-block">
                <select id="xfyf" name="xfyf">
                    <!--                    <option value="">请选择月份</option>-->
                    <option value="1">1个月</option>
                    <option value="2">2个月</option>
                    <option value="3">3个月</option>
                    <option value="4">4个月</option>
                    <option value="5">5个月</option>
                    <option value="6">6个月</option>
                    <option value="7">7个月</option>
                    <option value="8">8个月</option>
                    <option value="9">9个月</option>
                    <option value="10">10个月</option>
                    <option value="11">11个月</option>
                    <option value="12">12个月</option>
                </select>
            </div>
        </div>
    </form>
</div>

</body>
</html>
<script src="/layui/layui.all.js"></script>
<script src="/js/core.util.js"></script>
<script src="/js/common.js"></script>
<!--<script> src="/js/tseats/tseats.js"</script>-->
<script>
    //获取token
    var token = CoreUtil.getData("access_token");
    //地址栏转义token中的#号
    var tokenQuery = token.replace("#", "%23");
    var tableIns1;
    var tableInsXH;
    var tseatsIdInxiaohao;
    var table = layui.table;
    var form = layui.form;
    var layer = layui.layer;
    var $ = jQuery = layui.jquery;
    var laydate = layui.laydate;
    info();
    layui.use(['table', 'layer', 'laydate'], function () {

        //表头工具
        table.on('toolbar(showTable)', function (obj) {
            // document.getElementById("classaccountgly").removeAttribute("readOnly");
            // document.getElementById("classaccountdls").removeAttribute("readOnly");
            switch (obj.event) {
                case 'batchDeleted':
                    var checkStatus = table.checkStatus(obj.config.id);
                    var data = checkStatus.data;
                    if (data.length == 0) {
                        layer.msg("请选择要批量删除的列");
                    } else {
                        var ids = [];
                        $(data).each(function (index, item) {
                            ids.push(item.id);
                        });
                        tipDialog(ids);
                    }
                    break;
                case 'addType1':
                    $(".table_div").hide();
                    $(".tcType1").show();
                    $(".tcType2").hide();
                    $("#fromzjl").hide();
                    $("#fromdls").hide();
                    $(".operation").show();
                    $(".title").html("新增坐席");
                    var data = {
                        id: "",
                        role: "",
                        account: "",
                        password: "",
                        corporatename: "",
                        contacts: "",
                        phone: "",
                        state: "",
                        tcType1: "1",
                        residue1: "",
                        tcType2: "",
                        residue2: "",
                        amount: "",
                        endtime: "",
                        line: "",
                        seats: "",
                        mode: "",
                        salesname: "",
                        apkid: "",
                        ak: "",
                        sk: "",
                    }
                    //给表单赋值
                    form.val("tSeatsInfogly", data)
                    form.val("tSeatsInfodls", data)
                    break;
                case 'addType2':
                    $(".table_div").hide();
                    $("#fromzjl").hide();
                    $("#fromdls").hide();
                    $(".tcType1").hide();
                    $(".tcType2").show();//套餐模式
                    $(".operation").show();
                    $(".title").html("新增坐席(套餐模式)");
                    var data = {
                        id: "",
                        role: "",
                        account: "",
                        password: "",
                        corporatename: "",
                        contacts: "",
                        phone: "",
                        state: "",
                        tcType1: "",
                        residue1: "",
                        tcType2: "2",
                        residue2: "",
                        amount: "",
                        endtime: "",
                        line: "",
                        seats: "",
                        mode: "",
                        salesname: "",
                        apkid: "",
                        ak: "",
                        sk: "",
                    }
                    //给表单赋值
                    form.val("tSeatsInfogly", data)
                    form.val("tSeatsInfodls", data)
                    break;
                case 'addTypezjl':

                    $(".table_div").hide();
                    $(".tcType2").hide();
                    $("#fromgly").hide();
                    $("#fromdls").hide();
                    $(".operation").show();
                    $(".title").html("新增坐席");
                    //给表单赋值
                    form.val("tSeatsInfozjl", {
                        id: "",
                        role: "",
                        account: "",
                        password: "",
                        contacts: "",
                        phone: "",
                        dept: ""
                    })
                    break;
            }
            ;
        });
        //表头工具
        table.on('toolbardls(showTable)', function (obj) {
            switch (obj.event) {
                case 'batchDeleted':
                    var checkStatus = table.checkStatus(obj.config.id);
                    var data = checkStatus.data;
                    if (data.length == 0) {
                        layer.msg("请选择要批量删除的列");
                    } else {
                        var ids = [];
                        $(data).each(function (index, item) {
                            ids.push(item.id);
                        });
                        tipDialog(ids);
                    }
                    break;

                case 'addType1':
                    $(".table_div").hide();
                    $(".tcType1").show();
                    $(".tcType2").hide();//套餐模式
                    $("#fromzjl").hide();
                    $("#fromgly").hide();
                    $(".operation").show();
                    $(".title").html("新增坐席");
                    $(".operation input[name=id]").val("");
                    $(".operation input[name=accountid]").val("");
                    $(".operation input[name=password]").val("");
                    $(".operation input[name=corporatename]").val("");
                    $(".operation input[name=contacts]").val("");
                    $(".operation input[name=phone]").val("");
                    $(".operation select[name=roleId]").val("");
                    $(".operation input[name=state]").val("");
                    $(".operation input[name=tcType1]").val("");
                    $(".operation input[name=tcType2]").val("");
                    $(".operation input[name=residue1]").val("");
                    $(".operation input[name=residue2]").val("");
                    $(".operation input[name=amount]").val("");
                    $(".operation input[name=createtime]").val("");
                    $(".operation input[name=endtime]").val("");
                    $(".operation input[name=tccztime]").val("");
                    $(".operation input[name=line]").val("");
                    $(".operation input[name=apkid]").val("");
                    $(".operation input[name=ak]").val("");
                    $(".operation input[name=sk]").val("");
                    $(".operation input[name=seats]").val("");
                    $(".operation input[name=mode]").val("");
                    $(".operation input[name=salesname]").val("");
                    $(".operation input[name=xiaohao]").val("");
                    break;
                case 'addType2':
                    $(".table_div").hide();
                    $("#fromzjl").hide();
                    $("#fromgly").hide();
                    $(".tcType1").hide();
                    $(".tcType2").show();//套餐模式
                    $(".operation").show();
                    $(".title").html("新增坐席(套餐模式)");
                    $(".operation input[name=id]").val("");
                    $(".operation input[name=accountid]").val("");
                    $(".operation input[name=corporatename]").val("");
                    $(".operation input[name=contacts]").val("");
                    $(".operation input[name=phone]").val("");
                    $(".operation select[name=roleId]").val("");
                    $(".operation input[name=state]").val("");
                    $(".operation input[name=tcType1]").val("");
                    $(".operation input[name=tcType2]").val("");
                    $(".operation input[name=residue1]").val("");
                    $(".operation input[name=residue2]").val("");
                    $(".operation input[name=amount]").val("");
                    $(".operation input[name=createtime]").val("");
                    $(".operation input[name=endtime]").val("");
                    $(".operation input[name=tccztime]").val("");
                    $(".operation input[name=line]").val("");
                    $(".operation input[name=apkid]").val("");
                    $(".operation input[name=ak]").val("");
                    $(".operation input[name=sk]").val("");
                    $(".operation input[name=seats]").val("");
                    $(".operation input[name=mode]").val("");
                    $(".operation input[name=salesname]").val("");
                    $(".operation input[name=xiaohao]").val("");
                    break;
            }
            ;
        });
        //表头工具
        table.on('toolbarzjl(showTable)', function (obj) {

            switch (obj.event) {
                case 'batchDeleted':
                    var checkStatus = table.checkStatus(obj.config.id);
                    var data = checkStatus.data;
                    if (data.length == 0) {
                        layer.msg("请选择要批量删除的列");
                    } else {
                        var ids = [];
                        $(data).each(function (index, item) {
                            ids.push(item.id);
                        });
                        tipDialog(ids);
                    }
                    break;
                case 'addTypezjl':
                    $(".table_div").hide();
                    $(".tcType2").hide();
                    $("#fromgly").hide();
                    $(".operation").show();
                    $(".title").html("新增坐席");
                    $(".operation input[name=id]").val("");
                    $(".operation input[name=accountid]").val("");
                    $(".operation input[name=password]").val("");
                    $(".operation input[name=corporatename]").val("");
                    $(".operation input[name=contacts]").val("");
                    $(".operation input[name=phone]").val("");
                    $(".operation select[name=roleId]").val("");
                    $(".operation input[name=state]").val("");
                    $(".operation input[name=tcType1]").val("");
                    $(".operation input[name=tcType2]").val("");
                    $(".operation input[name=residue1]").val("");
                    $(".operation input[name=residue2]").val("");
                    $(".operation input[name=amount]").val("");
                    $(".operation input[name=createtime]").val("");
                    $(".operation input[name=endtime]").val("");
                    $(".operation input[name=tccztime]").val("");
                    $(".operation input[name=line]").val("");
                    $(".operation input[name=apkid]").val("");
                    $(".operation input[name=ak]").val("");
                    $(".operation input[name=sk]").val("");
                    $(".operation input[name=seats]").val("");
                    $(".operation input[name=mode]").val("");
                    $(".operation input[name=salesname]").val("");
                    $(".operation input[name=xiaohao]").val("");
                    break;
            };
        });
        //表头工具
        table.on('toolbarXH(showTableXH)', function (obj) {
            switch (obj.event) {
                case 'addXH':
                    layer.open({
                        type: 1,
                        offset: '50px',
                        skin: 'layui-layer-molv',
                        title: "添加小号",
                        area: ['800px', '400px'],
                        shade: 0,
                        shadeClose: false,
                        content: jQuery("#addxiaohao"),
                        btn: ['确定', '取消'],
                        yes: function (index) {
                            var zjh = $.trim($("#zjh").val());//中间号
                            var params = {
                                tseatsid: tseatsIdInxiaohao,
                                xiaohao: zjh
                            }
                            CoreUtil.sendPut("/tXiaohao/add", params, function (res) {
                                var code = res.code;
                                //同步数据失败
                                if (code != 0) {
                                    layer.msg(res.msg);
                                }
                                search();
                            });
                            layer.close(index);
                        }
                    });
                    break;
                case 'back':

                    $(".table_div").show();
                    $("#editxh").hide();
                    break;
            };
        });
        //列操作
        table.on('tool(showTable)', function (obj) {
            var data = obj.data;
            var userName = "";
            $.each(userSysUsers, function (index, user, array) {
                if (user.id == data.accountid) {
                    userName = user.username;
                }
            });

            switch (obj.event) {
                case 'editzjl':
                    //给表单赋值
                    form.val("tSeatsInfozjleidt", {
                        id: data.id,
                        role: data.role,
                        account: userName,
                        password: data.password,
                        contacts: data.contacts,
                        phone: data.phone,
                        dept: data.dept
                    })
                    $(".table_div").hide();
                    $("#fromglyeidt").hide();
                    $("#fromdlseidt").hide();
                    $(".operationeidt").show();
                    $(".title").html("编辑");
                    break;
                case 'del':
                    var ids = [];
                    ids.push(data.id);
                    tipDialog(ids);
                    break;
                case 'edit':
                    //给表单赋值
                    form.val("tSeatsInfoglyeidt", {
                        id: data.id,
                        role: data.role,
                        account: userName,
                        password: data.password,
                        corporatename: data.corporatename,
                        contacts: data.contacts,
                        phone: data.phone,
                        state: data.state,
                        tcType1: data.tcType,
                        residue1: data.residue,
                        tcType2: data.tcType,
                        residue2: data.residue,
                        amount: data.amount,
                        endtime: data.endtime,
                        line: data.line,
                        seats: data.seats,
                        mode: data.mode,
                        salesname: data.salesname,
                        apkid: data.apkid,
                        ak: data.ak,
                        sk: data.sk,
                    })
                    if (data.tcType == 1) {//坐席模式
                        $(".tcType2").hide();
                        $(".tcType1").show();
                    }
                    if (data.tcType == 2) {//套餐模式
                        $(".tcType1").hide();
                        $(".tcType2").show();
                    }
                    $(".table_div").hide();
                    $("#fromzjleidt").hide();
                    $("#fromdlseidt").hide();
                    $(".operationeidt").show();
                    $(".title").html("编辑");
                    break;
                case 'editdls':

                    //给表单赋值
                    form.val("tSeatsInfodls", {
                        id: data.id,
                        role: data.role,
                        account: userName,
                        password: data.password,
                        corporatename: data.corporatename,
                        contacts: data.contacts,
                        phone: data.phone,
                        state: data.state,
                        tcType: data.tcType,
                        residue: data.residue,
                        amount: data.amount,
                        endtime: data.endtime,
                        line: data.line,
                        seats: data.seats,
                        mode: data.mode,
                        salesname: data.salesname,
                        apkid: data.apkid,
                        ak: data.ak,
                        sk: data.sk,
                    })
                    if (data.tcType == 1) {//坐席模式
                        $(".tcType2").hide();
                        $(".tcType1").show();
                    }
                    if (data.tcType == 2) {//套餐模式
                        $(".tcType1").hide();
                        $(".tcType2").show();
                    }
                    $(".table_div").hide();
                    $("#fromzjleidt").hide();
                    $("#fromglyeidt").hide();
                    $(".operationeidt").show();
                    $(".title").html("编辑");
                    break;
                case 'editfzs':
                    //给表单赋值
                    form.val("editfzsInfo", {
                        id: data.id,
                        mobile: data.phone,
                    })
                    $("#smscode").val("");
                    $("#fzs").val("");
                    //验证码清空倒计时和样式
                    wait = 0;
                    time(this);
                    $("#smscode").attr("disabled", true);
                    $("#btnSendCode").attr("disabled", false).removeClass("layui-btn layui-btn-primary").addClass("layui-btn layui-btn-normal");
                    layer.open({
                        type: 1,
                        offset: '50px',
                        skin: 'layui-layer-molv',
                        title: "编辑分钟数",
                        area: ['800px', '400px'],
                        shade: 0,
                        shadeClose: false,
                        content: jQuery("#editfzs"),
                        btn: ['确定', '取消'],
                        yes: function (index) {
                            var fzs = $.trim($("#fzs").val());//分钟数
                            var smscode = $("#smscode").val();//验证码
                            var cztype = $("#cztype").val();//操作类型
                            var params = {
                                id: data.id,
                                fzs: fzs,
                                mobile: data.phone,//手机号
                                smscode: smscode,
                                cztype: cztype
                            }
                            CoreUtil.sendPut("/tSeats/updateFzs", params, function (res) {
                                var code = res.code;
                                //同步数据失败
                                if (code != 0) {
                                    layer.msg(res.msg);
                                }
                                search();
                            });
                            layer.close(index);
                        }
                    });
                    break;
                case 'editxf':
                    layer.open({
                        type: 1,
                        offset: '50px',
                        skin: 'layui-layer-molv',
                        title: "续费",
                        area: ['800px', '400px'],
                        shade: 0,
                        shadeClose: false,
                        content: jQuery("#editxf"),
                        btn: ['确定', '取消'],
                        yes: function (index) {
                            var id = data.id;//Id
                            var ygtc = $.trim($("#ygtc").val());//已购套餐
                            var xfyf = $("#xfyf").val();//续费月份
                            var params = {
                                id: id,
                                ygtc: ygtc,
                                xfyf: xfyf
                            }
                            CoreUtil.sendPut("/tSeats/updateXf", params, function (res) {
                                var code = res.code;
                                //同步数据失败
                                if (code != 0) {
                                    layer.msg(res.msg);
                                }
                                search();
                            });
                            layer.close(index);
                        }
                    });
                    break;
                case 'editxh' :
                    location.href="/index/tXiaohao/"+data.id;
                    break;
            }
        });
        //列操作xh
        table.on('toolXH(showTableXH)', function (obj) {
            var data = obj.data;
            switch (obj.event) {
                case 'del':
                    tipDialogXH(data.id);
                    break;
                case 'jinyong':
                    tjinyonglogXH(data.id);
                    break;
            }
        });
        //双击事件
        table.on('rowDouble(showTable)', function (obj) { //mainList表格Id
            var data = obj.data;
            var sysRoleName = userInfo.sysRoleName;

            if ((sysRoleName.indexOf("超级管理员")>-1 )) {
                //给表单赋值
                form.val("tSeatsInfoglyin", {
                    id: data.id,
                    role: data.rolename,
                    account: data.username,
                    password: data.password,
                    corporatename: data.corporatename,
                    contacts: data.contacts,
                    phone: data.phone,
                    state: data.state,
                    tcType: data.tcType==1?'坐席账户':'套餐账户',
                    residue: data.residue,
                    amount: data.amount,
                    endtime: data.endtime+"个月",
                    line: data.line,
                    seats: data.seats,
                    mode: data.mode,
                    salesname: data.salesname,
                    apkid: data.apkid,
                    ak: data.ak,
                    sk: data.sk,
                })
                if (data.tcType == 1) {//坐席模式
                    $(".tcType2").hide();
                    $(".tcType1").show();
                }
                if (data.tcType == 2) {//套餐模式
                    $(".tcType1").hide();
                    $(".tcType2").show();
                }
                $(".table_div").hide();
                $("#fromzjlin").hide();
                $("#fromdlsin").hide();
                $("#fromglyin").show();
                $(".operationin").show();
                $(".title").html("详情");
            } else  if ((sysRoleName.indexOf("代理商")>-1 )) {
                //给表单赋值
                form.val("tSeatsInfodlsiin", {
                    id: data.id,
                    role: data.rolename,
                    account: data.username,
                    password: data.password,
                    corporatename: data.corporatename,
                    contacts: data.contacts,
                    phone: data.phone,
                    state: data.state,
                    tcType: data.tcType,
                    residue: data.residue,
                    amount: data.amount,
                    endtime: data.endtime,
                    line: data.line,
                    seats: data.seats,
                    mode: data.mode,
                    salesname: data.salesname,
                    apkid: data.apkid,
                    ak: data.ak,
                    sk: data.sk,
                })
                // document.getElementById("classaccountdls").setAttribute("readOnly","true");
                if (data.tcType == 1) {//坐席模式
                    $(".tcType2").hide();
                    $(".tcType1").show();
                }
                if (data.tcType == 2) {//套餐模式
                    $(".tcType1").hide();
                    $(".tcType2").show();
                }
                $(".table_div").hide();
                $("#fromzjl").hide();
                $("#fromgly").hide();
                $(".operation").show();
                $(".title").html("详情");
            }else  if ((sysRoleName.indexOf("总经理")>-1 )) {

                //给表单赋值
                form.val("tSeatsInfozjlin", {
                    id: data.id,
                    role: data.rolename,
                    account: data.username,
                    password: data.password,
                    contacts: data.contacts,
                    phone: data.phone,
                    dept: data.deptname
                })
                $(".table_div").hide();
                $("#fromglyin").hide();
                $("#fromdlsin").hide();
                $(".operationin").show();
                $(".title").html("详情");
            }
        });
        //导出
        $('#export').on('click', function () {
            //原先分页limit
            var exportParams = {
                limit: 10000,
                account: $("#accountidSc").val(),
                roleId: $("#roleIdSC").val(),
                smfs: $("#smfs").val(),
                state: $("#stateSC").val(),
                corporatename: $("#corporatenameSC").val(),
                salesname: $("#salesnameSC").val()
            };
            CoreUtil.sendPost("/tSeats/listByPage", exportParams, function (res) {
                //初始化渲染数据
                if (res.data != null && res.data.records != null) {
                    table.exportFile(tableIns1.config.id, res.data.records, 'xls');
                }
            });
        });
        //删除
        var tipDialog = function (ids) {
            layer.open({
                content: "确定要删除么?",
                yes: function (index, layero) {
                    layer.close(index); //如果设定了yes回调，需进行手工关闭
                    CoreUtil.sendDelete("/tSeats/delete", ids, function (res) {
                        layer.msg(res.msg, {time: 1000}, function () {
                            search();
                        });
                    });
                }
            });
        };
        //删除小号
        var tipDialogXH = function (ids) {
            layer.open({
                content: "确定要删除么?",
                yes: function (index, layero) {
                    layer.close(index); //如果设定了yes回调，需进行手工关闭
                    CoreUtil.sendDelete("/tSeats/xh/delete", ids, function (res) {
                        layer.msg(res.msg, {time: 1000}, function () {
                            searchXH();
                        });
                    });
                }
            });
        };
        //禁用小号
        var tjinyonglogXH = function (ids) {
            layer.open({
                content: "确定要禁用么?",
                yes: function (index, layero) {
                    layer.close(index); //如果设定了yes回调，需进行手工关闭
                    CoreUtil.sendDelete("/tSeats/xh/jinyong", ids, function (res) {
                        layer.msg(res.msg, {time: 1000}, function () {
                            searchXH();
                        });
                    });
                }
            });
        };
        //返回
        $("#btn_cancel").click(function () {
            $(".table_div").show();
            $(".operation").hide();
            const fromg = document.querySelector("#fromgly");
            fromg.querySelectorAll('button')[0].setAttribute('style','display:')
            const fromElements = fromg.querySelectorAll('input','select','textarea');
            for(let i=0;i<fromElements.length; i++) {
                fromElements[i].setAttribute('readonly',false);
                fromElements[i].setAttribute('disabled',false);
            }
            return false;
        });

        //返回
        $("#btn_cancelgly").click(function () {
            inCancel();
        });
        //返回
        $("#btn_canceldls").click(function () {
            inCancel();
        });
        //返回
        $("#btn_cancelzjl").click(function () {
            inCancel();
        });
        //详情返回
        function inCancel(){
            $(".table_div").show();
            $(".operationin").hide();
            return false;
        }
        //返回
        $(".canceleidt").click(function () {
            eidtCancel();
        });
        function inCancel(){
            $(".table_div").show();
            $(".operationeidt").hide();
            return false;
        }
        $("#btn_canceldls").click(function () {
            $(".table_div").show();
            $(".operation").hide();
            const fromg = document.querySelector("#fromdls");
            fromg.querySelectorAll('button')[0].setAttribute('style','display:')
            const fromElements = fromg.querySelectorAll('input','select','textarea');
            for(let i=0;i<fromElements.length; i++) {
                fromElements[i].setAttribute('readonly',false);
                fromElements[i].setAttribute('disabled',false);
            }
            return false;
        });
        //返回
        $("#btn_cancelXH").click(function () {
            $(".table_div").show();
            $("#editxh").hide();
            return false;
        });
        //返回
        $("#btn_cancelzjl").click(function () {
            $(".table_div").show();
            $(".operation").hide();
            const fromg = document.querySelector("#fromzjl");
            fromg.querySelectorAll('button')[0].setAttribute('style','display:')
            const fromElements = fromg.querySelectorAll('input','select','textarea');
            for(let i=0;i<fromElements.length; i++) {
                fromElements[i].setAttribute('readonly',false);
                fromElements[i].setAttribute('disabled',false);
            }
            return false;
        });

        //监听保存
        form.on('submit(submitgly)', function (data) {
            if (data.field.id === undefined || data.field.id === null || data.field.id === "") {

                var isHidden = $('.tcType1').is(':hidden');
                if (isHidden) {
                    data.field.tcType1=2;
                    data.field.tcType2=2;
                    data.field.residue2=data.field.residue
                } else {
                    data.field.tcType1=1;
                    data.field.tcType2=1;
                    data.field.residue1=data.field.residue
                }
                CoreUtil.sendPost("/tSeats/add", data.field, function (res) {
                    if (res.code == "0") {
                        $(".table_div").show();
                        $(".operation").hide();
                        $(".operationeidt").hide();
                        search();
                    } else {
                        layui.msg(res.msg);
                    }
                });
            } else {
                var isHidden = $('.tcType1').is(':hidden');//坐席账户
                if (isHidden) {
                    data.field.tcType1=2;
                    data.field.tcType2=2;
                } else {
                    data.field.tcType1=1;
                    data.field.tcType2=1;
                }
                CoreUtil.sendPut("/tSeats/update", data.field, function (res) {
                    if (res.code == "0") {
                        $(".table_div").show();
                        $(".operation").hide();
                        $(".operationeidt").hide();
                        search();
                    } else {
                        layui.msg(res.msg);
                    }
                });
            }
            return false;
        });
        //监听保存总经理级别
        form.on('submit(submitzjl)', function (data) {
            if (data.field.id === undefined || data.field.id === null || data.field.id === "") {
                CoreUtil.sendPost("/tSeats/add", data.field, function (res) {
                    if (res.code == "0") {
                        $(".table_div").show();
                        $(".operation").hide();
                        $(".operationeidt").hide();
                        search();
                    } else {
                        layui.msg(res.msg);
                    }
                });
            } else {
                CoreUtil.sendPut("/tSeats/update", data.field, function (res) {
                    $(".table_div").show();
                    $(".operation").hide();
                    $(".operationeidt").hide();
                    search();
                });
            }
            return false;
        });
    });

    //监听保存 管理员编辑
    form.on('submit(submitglyeidt)', function (data) {
        CoreUtil.sendPut("/tSeats/update", data.field, function (res) {
            if (res.code == "0") {
                $(".table_div").show();
                $(".operation").hide();
                $(".operationeidt").hide();
                search();
            } else {
                layui.msg(res.msg);
            }
        });
        return false;
    });

    //监听保存管理员
    form.on('submit(submitglyadd)', function (data) {

        CoreUtil.sendPost("/tSeats/add", data.field, function (res) {
            if (res.code == "0") {
                $(".table_div").show();
                $(".operation").hide();
                $(".operationeidt").hide();
                search();
            } else {
                layui.msg(res.msg);
            }
        });
        return false;
    });
    //监听保存代理商
    form.on('submit(submitdlsadd)', function (data) {
        CoreUtil.sendPost("/tSeats/add", data.field, function (res) {
            if (res.code == "0") {
                $(".table_div").show();
                $(".operation").hide();
                $(".operationeidt").hide();
                search();
            } else {
                layui.msg(res.msg);
            }
        });
        return false;
    });
    //监听保存总经理级别
    form.on('submit(submitzjladd)', function (data) {
        CoreUtil.sendPost("/tSeats/add", data.field, function (res) {
            if (res.code == "0") {
                $(".table_div").show();
                $(".operation").hide();
                $(".operationeidt").hide();
                search();
            } else {
                layui.msg(res.msg);
            }
        });
        return false;
    });
    function addXHtableInfo(tseatsid){
        tseatsIdInxiaohao = tseatsid;
        tableInsXH = table.render({
            elem: '#showTableXH'
            , contentType: 'application/json'
            , headers: {"authorization": token}
            , page: true //开启分页
            , url: '/tXiaohao/listByPage' //数据接口
            , method: 'POST'
            , where:{
                tseatsid:tseatsid
            }
            , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
                return {
                    "code": res.code, //解析接口状态
                    "msg": res.msg, //解析提示文本
                    "count": CoreUtil.isEmpty(res.data) ? 0 : res.data.total, //解析数据长度
                    "data": CoreUtil.isEmpty(res.data) ? null : res.data.records //解析数据列表
                }
            }
            , cols: [
                [
                    {type: 'checkbox', fixed: 'left'},
                    {title: "序号",type: "numbers", width: 130, fixed: "left"},
                    {
                        field: 'accountid', title: '账号', templet: function (item) {
                            var userName = "";
                            $.each(userSysUsers, function (index, user, array) {
                                if (user.id == item.accountid) {
                                    userName = user.username;
                                }
                            });
                            return userName;
                        }, sort: true,align:"center",  width: 130, fixed: "left"
                    },
                    {field: 'xiaohao', title: '小号', sort: true,align:"center",  width: 130, fixed: "left"},
                    {field: 'shengyucishu', title: '剩余次数', sort: true,align:"center",  width: 130},
                    {field: 'addtime', title: '添加时间', sort: true,align:"center",  width: 130},
                    {width: 280, toolbar: "#toolXH", title: '操作', fixed: "right"}
                ]
            ]
            , toolbar: '#toolbarXH'
        });
    }

    //加载表格
    function tableIns() {
        //根据角色区分表格
        var sysRoleName = userInfo.sysRoleName;
        if (!tableIns1 && (sysRoleName.indexOf("超级管理员")>-1 )) {
            //加载table
            tableIns1 = table.render({
                elem: '#showTable'
                , contentType: 'application/json'
                , headers: {"authorization": token}
                , page: true //开启分页
                , url: '/tSeats/listByPage' //数据接口
                , method: 'POST'
                , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
                    return {
                        "code": res.code, //解析接口状态
                        "msg": res.msg, //解析提示文本
                        "count": CoreUtil.isEmpty(res.data) ? 0 : res.data.total, //解析数据长度
                        "data": CoreUtil.isEmpty(res.data) ? null : res.data.records //解析数据列表
                    }
                }
                , cols: [
                    [
                        {type: 'checkbox', fixed: 'left'},
                        {title: "序号",type: "numbers", width: 130, fixed: "left"},
                        {
                            field: 'accountid', title: '账号', templet: function (item) {
                                return item.username;
                            }, sort: true,align:"center",  width: 130, fixed: "left"
                        },
                        {field: 'corporatename', title: '公司名称', sort: true,align:"center",  width: 130, fixed: "left"},
                        {field: 'contacts', title: '联系人', sort: true,align:"center",  width: 130},
                        {field: 'phone', title: '联系方式', sort: true,align:"center",  width: 130},
                        {
                            field: 'role', title: '角色', templet: function (item) {
                                return item.rolename;
                            }, sort: true,align:"center",  width: 130
                        },
                        {
                            field: 'state', title: '状态', templet: function (item) {
                                if (item.state === '0') {
                                    return '  <input type="checkbox" lay-skin="switch" lay-text="启用|禁用" checked disabled>';
                                }
                                if (item.state === '1') {
                                    return '  <input type="checkbox" lay-skin="switch" lay-text="启用|禁用" disabled>';
                                }
                            }, sort: true,align:"center",  width: 130
                        },
                        {
                            field: 'tcType', title: '套餐类型', templet: function (item) {
                                if (item.tcType === '1') {
                                    return '坐席账户';
                                }
                                if (item.tcType === '2') {
                                    return '套餐账户';
                                }
                            }, sort: true,align:"center",  width: 130
                        },
                        {field: 'residue', title: '剩余分钟数', sort: true,align:"center",  width: 130},
                        {field: 'amount', title: '当前分钟金额（元）', sort: true,align:"center",  width: 130},
                        {field: 'createtime', title: '创建时间', sort: true,align:"center",  width: 230},
                        {field: 'endtime', title: '到期时间', templet: function (item) {
                                return item.endtime+'个月';
                            },sort: true,align:"center",  width: 130},
                        {field: 'tccztime', title: '套餐重置时间', sort: true,align:"center",  width: 230},
                        {field: 'line', title: '线路', sort: true,align:"center",  width: 130},
                        {field: 'seats', title: '坐席数量', sort: true,align:"center",  width: 130},
                        {field: 'mode', title: '模式', sort: true,align:"center",  width: 130},
                        {field: 'salesname', title: '销售姓名', sort: true,align:"center",  width: 130},
                        // {field: 'xiaohao', title: '小号', templet: function (item) {
                        //         return '  <a href="/index/tXiaohao"data-title="小号" >小号</a>';
                        //     },sort: true,align:"center",  width: 130},
                        // {field: 'password', title: 'password', sort: true,align:"center",  style: 'display: none'},
                        {width: 280, toolbar: "#tool", title: '操作', fixed: "right"}
                    ]
                ]
                , toolbar: '#toolbar'
            });
        }
        else if (!tableIns1 && ( sysRoleName.indexOf("代理")>-1)) {
            //加载table
            tableIns1 = table.render({
                elem: '#showTable'
                , contentType: 'application/json'
                , headers: {"authorization": token}
                , page: true //开启分页
                , url: '/tSeats/listByPage' //数据接口
                , method: 'POST'
                , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
                    return {
                        "code": res.code, //解析接口状态
                        "msg": res.msg, //解析提示文本
                        "count": CoreUtil.isEmpty(res.data) ? 0 : res.data.total, //解析数据长度
                        "data": CoreUtil.isEmpty(res.data) ? null : res.data.records //解析数据列表
                    }
                }
                , cols: [
                    [
                        {type: 'checkbox', fixed: 'left'},
                        {title: "序号",type: "numbers", width: 130, fixed: "left"},
                        {
                            field: 'accountid', title: '账号', templet: function (item) {
                                return item.username;
                            }, sort: true,align:"center",  width: 130, fixed: "left"
                        },
                        {
                            field: 'state', title: '状态', templet: function (item) {
                                if (item.state === '0') {
                                    return '  <input type="checkbox" lay-skin="switch" lay-text="启用|禁用" checked disabled>';
                                }
                                if (item.state === '1') {
                                    return '  <input type="checkbox" lay-skin="switch" lay-text="启用|禁用" disabled>';
                                }
                            }, sort: true,align:"center",  width: 130
                        },
                        {field: 'corporatename', title: '公司名称', sort: true,align:"center",  width: 130},
                        {field: 'contacts', title: '联系人', sort: true,align:"center",  width: 130},
                        {field: 'phone', title: '主叫号码', sort: true,align:"center",  width: 130},
                        {
                            field: 'tcType', title: '套餐类型', templet: function (item) {
                                if (item.tcType === '1') {
                                    return '坐席账户';
                                }
                                if (item.tcType === '2') {
                                    return '套餐账户';
                                }
                            }, sort: true,align:"center",  width: 130
                        },
                        {field: 'residue', title: '剩余分钟数', sort: true,align:"center",  width: 130},
                        {field: 'amount', title: '当前分钟金额（元）', sort: true,align:"center",  width: 130},
                        {
                            field: 'role', title: '角色', templet: function (item) {
                                return item.rolename;
                            }, sort: true,align:"center",  width: 130
                        },
                        {field: 'endtime', title: '到期时间', templet: function (item) {
                                return item.endtime+'个月';
                            },sort: true,align:"center",  width: 130},
                        {field: 'createtime', title: '创建时间', sort: true,align:"center",  width: 130},
                        // {field: 'password', title: 'password', sort: true,align:"center",  style: 'display: none'},

                        {width: 280, toolbar: "#tooldls", title: '操作', fixed: "right"}
                    ]
                ]
                , toolbar: '#toolbar'
            });
        }
        else {
            //加载table
            tableIns1 = table.render({
                elem: '#showTable'
                , contentType: 'application/json'
                , headers: {"authorization": token}
                , page: true //开启分页
                , url: '/tSeats/listByPage' //数据接口
                , method: 'POST'
                , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
                    return {
                        "code": res.code, //解析接口状态
                        "msg": res.msg, //解析提示文本
                        "count": CoreUtil.isEmpty(res.data) ? 0 : res.data.total, //解析数据长度
                        "data": CoreUtil.isEmpty(res.data) ? null : res.data.records //解析数据列表
                    }
                }
                , cols: [
                    [
                        {type: 'checkbox', fixed: 'left'},
                        {title: "序号",type: "numbers", width: 130, fixed: "left"},
                        {
                            field: 'accountid', title: '账号', templet: function (item) {
                                return item.username;
                            }, sort: true,align:"center",  width: 130, fixed: "left"
                        },
                        {
                            field: 'state', title: '状态', templet: function (item) {
                                if (item.state === '0') {
                                    return '  <input type="checkbox" lay-skin="switch" lay-text="启用|禁用" checked disabled>';
                                }
                                if (item.state === '1') {
                                    return '  <input type="checkbox" lay-skin="switch" lay-text="启用|禁用" disabled>';
                                }
                            }, sort: true,align:"center",  width: 130
                        },
                        {field: 'contacts', title: '姓名', sort: true,align:"center",  width: 130},
                        {field: 'phone', title: '主叫号码', sort: true,align:"center",  width: 130},
                        {field: 'corporatename', title: '公司名称', sort: true,align:"center",  width: 130},
                        {field: 'dept', title: '部门', templet: function (item) {
                                return item.deptname;
                            },  sort: true,align:"center",  width: 130},
                        {field: 'role', title: '角色',  templet: function (item) {
                                return item.rolename;
                            },    sort: true,align:"center",  width: 130},
                        {field: 'createtime', title: '创建时间', sort: true,align:"center",  width: 130},
                        // {field: 'password', title: 'password', sort: true,align:"center",  style: 'display: none'},
                        {width: 280, toolbar: "#tooldlszjl", title: '操作', fixed: "right"}
                    ]
                ]
                , toolbar: '#toolbarzjl'
            });
        }
    }

    /*layui调用*/
    layui.use(['layer', 'form'], function () {
        $ = layui.jquery;
        var form = layui.form, layer = layui.layer;
        //自定义验证规则
        form.verify({
            // fzs: [/^1[3|4|5|7|8]\d{9}$/, '手机必须11位，只能是数字。']
        });
    });

    var wait = 60;

    function time(o) {//60秒倒计时
        if (wait == 0) {
            o.removeAttribute("disabled");
            o.value = "获取验证码";
            wait = 60;
        } else {
            o.setAttribute("disabled", true);
            o.value = "重新发送(" + wait + ")";
            wait--;
            setTimeout(function () {
                time(o);
            }, 1000);
        }
    }

    //验证码
    $("#fzs").change(function () {
        var fzs = $.trim($("#fzs").val());
        var mobile = $("#mobile").val();
        if (fzs.length > 0) {
            $("#smscode").attr("disabled", false).css({"background-color": "#fff"});
            $("#btnSendCode").attr("disabled", false).removeClass("layui-btn layui-btn-primary").addClass("layui-btn layui-btn-normal");
            document.getElementById("btnSendCode").onclick = function () {
                if (wait != 60) {
                    console.log("请" + wait + "秒后再试！");
                    return;
                }
                if (fzs == '') {
                    console.log("请填写分钟数");
                    return;
                }
                $("#smscode").val("");
                time(this);

                CoreUtil.sendGet("/smscode/" + $("#mobile").val(), null, function (res) {
                    if (res.code == 0) {
                        $("#smscode").val(res.data);
                    } else {
                        layui.msg("验证码发送失败！");
                    }
                });
            }
        } else {
            $("#smscode").attr("disabled", true);
            $("#btnSendCode").attr("disabled", false).removeClass("layui-btn layui-btn-primary").addClass("layui-btn layui-btn-normal");
        }
    });

    function info() {
        userInfo = CoreUtil.getData("userInfo");
        userRoles = CoreUtil.getData("userRoles");
        userDepts = CoreUtil.getData("userDepts");
        sysRolesList = CoreUtil.getData("sysRolesList");
        userSysUsers = CoreUtil.getData("userSysUsers");
        hwtj = CoreUtil.getData("hwtj");
        sysRoleName = userInfo.sysRoleName;
        if (sysRoleName == "超级管理员") {
            location.href="/index/tSeats/gly";
            $("#usernameScid").hide();
        } else if (sysRoleName == "代理商") {
            location.href="/index/tSeats/dls";
            $("#accountidScid").hide();
            $("#roleIdSCid").hide();
            $("#smfsid").hide();
            $("#lineSCid").hide();
            $("#salesnameSCid").hide();
        } else if (sysRoleName == "总经理"||sysRoleName == "总监"||sysRoleName == "主管") {
            location.href="/index/tSeats/zjl";
            $("#accountidScid").hide();
            $("#roleIdSCid").hide();
            $("#smfsid").hide();
            $("#stateSCid").hide();
            $("#zxSCid").hide();
            $("#lineSCid").hide();
            $("#corporatenameSCid").hide();
            $("#salesnameSCid").hide();
            $("#tclxSCid").hide();
        }
        var belongstoId = $("#roleId");
        var roleIdSC = $("#roleIdSC");
        var roleIddls = $("#roleIddls");
        var roleIdzjl = $("#roleIdzjl");
        var roleIdzjleidt = $("#roleIdzjleidt");
        $.each(userRoles, function (index, item) {
            belongstoId.append("<option value=" + item.id + ">" + item.name + "</option>");
            roleIddls.append("<option value=" + item.id + ">" + item.name + "</option>");
            roleIdzjl.append("<option value=" + item.id + ">" + item.name + "</option>");
            roleIdSC.append("<option value=" + item.id + ">" + item.name + "</option>");
            roleIdzjleidt.append("<option value=" + item.id + ">" + item.name + "</option>");
        });
        //部门下拉选
        var deptId = $("#deptId");
        var deptIdeidt = $("#deptIdeidt");
        $.each(userDepts, function (index, item) {
            deptId.append("<option value=" + item.id + ">" + item.name + "</option>");
            deptIdeidt.append("<option value=" + item.id + ">" + item.name + "</option>");
        });
        form.render("select");
        //加载表格
        tableIns();
        CoreUtil.sendGet("/tSeats/infoData/", null, function (res) {
            var code = res.code;
            var data = res.data;
            if (code == 0) {
                var belongstoId = $("#smfs");
                $.each(data.smfss, function (index, item) {
                    belongstoId.append("<option value=" + item.id + ">" + item.label + "</option>");
                });
                var lineSC = $("#lineSC");
                var line = $("#line");
                var linedls = $("#linedls");
                $.each(data.lines, function (index, item) {
                    lineSC.append("<option value=" + item.label + ">" + item.label + "</option>");
                    line.append("<option value=" + item.label + ">" + item.label + "</option>");
                    linedls.append("<option value=" + item.label + ">" + item.label + "</option>");
                });
                var corporatenameSC = $("#corporatenameSC");
                $.each(data.corporatenames, function (index, item) {
                    if (!!item) {
                        corporatenameSC.append("<option value=" + item + ">" + item + "</option>");
                    }
                });
                var salesnameSC = $("#salesnameSC");
                $.each(data.salesnames, function (index, item) {
                    if (!!item) {
                        salesnameSC.append("<option value=" + item + ">" + item + "</option>");
                    }
                });
                form.render("select");
            }
        });
        // search();
    }

    //执行查询
    function search() {
        debugger
        //这里以搜索为例
        tableIns1.reload({
            where: { //设定异步数据接口的额外参数，任意设
                account: $("#accountidSc").val(),
                role: $("#roleIdSC").val(),
                smfs: $("#smfs").val(),
                state: $("#stateSC").val(),
                corporatename: $("#corporatenameSC").val(),
                salesname: $("#salesnameSC").val(),
                tclx: $("#tclxSC").val(),
                zxlx: $("#zxlxSC").val(),
                line: $("#lineSC").val(),
            }
            , page: {
                curr: 1 //重新从第 1 页开始
            }
        });
    };
    //执行查询小号
    function searchXH() {
        debugger
        //这里以搜索为例
        tableInsXH.reload({
            where: { //设定异步数据接口的额外参数，任意设
                // account: $("#accountidSc").val(),

            }
            , page: {
                curr: 1 //重新从第 1 页开始
            }
        });
    };

    // })
</script>